#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

const unsigned int A = 1664525, C = 1013904223;
const unsigned int MAX = 4294967295;

unsigned int next(unsigned int x) {
  return x*A+C;
}

int main() {
  unsigned long pointsOut = 0, pointsIn = 0;
  unsigned int x = time(NULL);
  unsigned int y = next(x);
  float px,py;

  for (int i=0;i<1000000000;i++) {
    px = (float)x/MAX - 0.5;
    py = (float)y/MAX - 0.5;

    if ((px*px + py*py) <= 0.25)
      pointsIn++;
    else
      pointsOut++;

    x = next(y);
    y = next(x);
  }

  printf("%.6f\n",(float)4*(float)pointsIn/((float)pointsIn+pointsOut));

  return 0;
}
